<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.util.container.Clink</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.util.container.Clink";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.util.container.Clink.html" class="symbol">tango.util.container.Clink</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Apr 2008: Initial release
<p class="sec_header">Authors:</p>Kris
<p class="sec_header">Since:</p>0.99.7
<p class="bl"/>
        Based upon Doug Lea's Java collection package
<dl>
<dt class="decl">struct <a class="symbol _struct" name="Clink" href="./htmlsrc/tango.util.container.Clink.html#L25" kind="struct" beg="25" end="242">Clink</a><span class="tparams">(V)</span>; <a title="Permalink to this symbol" href="#Clink" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L25">#</a></dt>
<dd class="ddef">
<div class="summary">Clinks are links that are always arranged in circular lists.</div>
<dl>
<dt class="decl">Ref <a class="symbol _function" name="Clink.set" href="./htmlsrc/tango.util.container.Clink.html#L40" kind="function" beg="40" end="43">set</a><span class="params">(V <em>v</em>)</span>; <a title="Permalink to this symbol" href="#Clink.set" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L40">#</a></dt>
<dd class="ddef">
<div class="summary">Set to point to ourselves</div></dd>
<dt class="decl">Ref <a class="symbol _function" name="Clink.set:2" href="./htmlsrc/tango.util.container.Clink.html#L54" kind="function" beg="54" end="60">set</a><span class="params">(V <em>v</em>, Ref <em>p</em>, Ref <em>n</em>)</span>; <a title="Permalink to this symbol" href="#Clink.set:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L54">#</a></dt>
<dd class="ddef">
<div class="summary">Set to point to n as next cell and p as the prior cell</div>
<p class="sec_header">param:</p>n, the new next cell
<p class="sec_header">param:</p>p, the new prior cell</dd>
<dt class="decl">bool <a class="symbol _function" name="Clink.singleton" href="./htmlsrc/tango.util.container.Clink.html#L66" kind="function" beg="66" end="69">singleton</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Clink.singleton" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L66">#</a></dt>
<dd class="ddef">
<div class="summary">Return true if current cell is the only one on the list</div></dd>
<dt class="decl">void <a class="symbol _function" name="Clink.addNext" href="./htmlsrc/tango.util.container.Clink.html#L86" kind="function" beg="86" end="91">addNext</a><span class="params">(V <em>v</em>, Ref delegate() <em>alloc</em>)</span>; <a title="Permalink to this symbol" href="#Clink.addNext" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L86">#</a></dt>
<dd class="ddef">
<div class="summary">Make a cell holding v and link it immediately after current cell</div></dd>
<dt class="decl">Ref <a class="symbol _function" name="Clink.addPrev" href="./htmlsrc/tango.util.container.Clink.html#L97" kind="function" beg="97" end="104">addPrev</a><span class="params">(V <em>v</em>, Ref delegate() <em>alloc</em>)</span>; <a title="Permalink to this symbol" href="#Clink.addPrev" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L97">#</a></dt>
<dd class="ddef">
<div class="summary">make a node holding v, link it before the current cell, and return it</div></dd>
<dt class="decl">void <a class="symbol _function" name="Clink.linkPrev" href="./htmlsrc/tango.util.container.Clink.html#L110" kind="function" beg="110" end="119">linkPrev</a><span class="params">(Ref <em>p</em>)</span>; <a title="Permalink to this symbol" href="#Clink.linkPrev" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L110">#</a></dt>
<dd class="ddef">
<div class="summary">link p before current cell</div></dd>
<dt class="decl">int <a class="symbol _function" name="Clink.size" href="./htmlsrc/tango.util.container.Clink.html#L125" kind="function" beg="125" end="134">size</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Clink.size" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L125">#</a></dt>
<dd class="ddef">
<div class="summary">return the number of cells in the list</div></dd>
<dt class="decl">Ref <a class="symbol _function" name="Clink.find" href="./htmlsrc/tango.util.container.Clink.html#L141" kind="function" beg="141" end="150">find</a><span class="params">(V <em>element</em>)</span>; <a title="Permalink to this symbol" href="#Clink.find" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L141">#</a></dt>
<dd class="ddef">
<div class="summary">return the first cell holding element found in a circular traversal starting
 at current cell, or null if no such</div></dd>
<dt class="decl">int <a class="symbol _function" name="Clink.count" href="./htmlsrc/tango.util.container.Clink.html#L157" kind="function" beg="157" end="167">count</a><span class="params">(V <em>element</em>)</span>; <a title="Permalink to this symbol" href="#Clink.count" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L157">#</a></dt>
<dd class="ddef">
<div class="summary">return the number of cells holding element found in a circular
 traversal</div></dd>
<dt class="decl">Ref <a class="symbol _function" name="Clink.nth" href="./htmlsrc/tango.util.container.Clink.html#L173" kind="function" beg="173" end="179">nth</a><span class="params">(int <em>n</em>)</span>; <a title="Permalink to this symbol" href="#Clink.nth" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L173">#</a></dt>
<dd class="ddef">
<div class="summary">return the nth cell traversed from here. It may wrap around.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Clink.unlinkNext" href="./htmlsrc/tango.util.container.Clink.html#L187" kind="function" beg="187" end="192">unlinkNext</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Clink.unlinkNext" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L187">#</a></dt>
<dd class="ddef">
<div class="summary">Unlink the next cell.
 This has no effect on the list if isSingleton()</div></dd>
<dt class="decl">void <a class="symbol _function" name="Clink.unlinkPrev" href="./htmlsrc/tango.util.container.Clink.html#L199" kind="function" beg="199" end="204">unlinkPrev</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Clink.unlinkPrev" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L199">#</a></dt>
<dd class="ddef">
<div class="summary">Unlink the previous cell.
 This has no effect on the list if isSingleton()</div></dd>
<dt class="decl">void <a class="symbol _function" name="Clink.unlink" href="./htmlsrc/tango.util.container.Clink.html#L212" kind="function" beg="212" end="220">unlink</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Clink.unlink" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L212">#</a></dt>
<dd class="ddef">
<div class="summary">Unlink self from list it is in.
 Causes it to be a singleton</div></dd>
<dt class="decl">Ref <a class="symbol _function" name="Clink.copyList" href="./htmlsrc/tango.util.container.Clink.html#L226" kind="function" beg="226" end="241">copyList</a><span class="params">(Ref delegate() <em>alloc</em>)</span>; <a title="Permalink to this symbol" href="#Clink.copyList" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.container.Clink.html#L226">#</a></dt>
<dd class="ddef">
<div class="summary">Make a copy of the list and return new head.</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2008 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:07 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>